﻿package Common 
{
	import flash.display.MovieClip;

	/**
	 * ...
	 * @author ...
	 */
	public class MessageBox 
	{
		public static var uiMc:MovieClip = null;
		
		public function MessageBox() 
		{
			
		}
		
		
		
		public static function Debug( string:String ):void
		{
			
		}
		
		
		public static function init():void
		{
			MessageBox.uiMc.visible = false;
			RenderManager.instance.UiLoadingSprite.addChild( MessageBox.uiMc );
			MessageBox.reSize();
		}
		
		
		public static function MsgFormID( strID:String , l:Boolean = false ):void
		{
			if ( uiMc )
			{
				uiMc.setText( strID , l );
			}
		}
		
		
		public static function unshow():void
		{
			if ( uiMc )
			{
				uiMc.visible = false;
			}
		}
		
		
		public static function Msg( str:String , l:Boolean = false ):void
		{
			if ( uiMc )
			{
				uiMc.visible = true;
				uiMc.setText( str , l );
			}
		}
		
		
		public static function reSize():void
		{
			if ( uiMc )
			{
				uiMc.x = RenderManager.instance.stageWidth * 0.5;
				uiMc.y = RenderManager.instance.stageHeight * 0.5;
			}
		}
		
	}
	
}